
<form class="dux-form uk-form  uk-form-horizontal " data-dux="form-bind" method="post">

    <div class="uk-card uk-card-small uk-card-default dux-panel">

        <div class="uk-card-header">{$assignName}文章</div>
        <div class="uk-card-body">
            <fieldset>
                <div class="uk-flex">
                    <div class="uk-flex-1">
                        <div class="uk-form-group">
                            <label class="uk-form-label">文章分类</label>
                            <div class="uk-form-controls">
                                <select class="uk-select" data-dux="form-select" name="class_id" required>
                                    <!--loop{(array)$classList as $vo}-->
                                    <option <!--if{$vo.class_id == $classId}--> selected <!--{/if}-->
                                    value="{$vo.class_id}">{$vo.cname}</option>
                                    <!--{/loop}-->
                                </select>
                            </div>
                        </div>
                        <div class="uk-form-group">
                            <label class="uk-form-label">文章标题</label>
                            <div class="uk-form-controls">
                                <input class="uk-input" type="text" name="title" value="{$info.title}" placeholder="请输入文章标题"
                                       required>
                            </div>
                        </div>
                        <div class="uk-form-group">
                            <label class="uk-form-label">副标题</label>
                            <div class="uk-form-controls">
                                <input class="uk-input" type="text" name="sub_title" value="{$info.sub_title}" placeholder="可选,文章副标题">
                            </div>
                        </div>
                    </div>
                    <div style="width: 200px;" class="uk-text-right">
                        <div class="uk-cover-container uk-height-medium uk-inline-clip uk-transition-toggle uk-light" style="width: 180px; height: 155px">
                            <img src="{$info.image ? $info.image : url('controller/tools/Placeholder/index', ['width' => 150, 'height' => 125])}" uk-cover  id="image-pic">
                            <div class="uk-position-center">
                                <a href="javascript:;" ><span data-dux="form-upload" data-target="#image" data-type="jpg,png,bmp" data-preview="#image-pic" class="uk-transition-fade" uk-marker></span></a>
                            </div>
                            <input type="hidden"  name="image" id="image" value="{$info.image}">
                        </div>
                    </div>
                </div>

                <div class="uk-form-group">
                    <label class="uk-form-label">文章信息</label>
                    <div class="uk-form-controls">
                        <div class="uk-grid">
                            <div class="uk-width-1-3"><input class="uk-input" type="text" name="auth" value="{$info.auth}"
                                                             placeholder="文章作者"></div>
                            <div class="uk-width-1-3"><input class="uk-input" type="number" name="sort" value="{$info.sort}"
                                                             placeholder="文章顺序"></div>
                            <div class="uk-width-1-3"><input class="uk-input" type="number" name="virtual_view" value="{$info.virtual_view}"
                                                             placeholder="虚拟浏览量"></div>
                        </div>
                    </div>
                </div>

                <div class="uk-form-group">
                    <label class="uk-form-label">正文内容</label>
                    <div class="uk-form-controls">
                        <textarea data-dux="form-editor" name="content" style="height: 400px">{$info.content}</textarea>
                    </div>
                </div>
                <div class="uk-form-group">
                    <label class="uk-form-label">关键词</label>
                    <div class="uk-form-controls">
                        <input class="uk-input" type="text" name="keyword" value="{$info.keyword}" data-dux="form-tags" placeholder="可选,文章关键词">
                    </div>
                </div>
                <div class="uk-form-group">
                    <label class="uk-form-label">文章描述</label>
                    <div class="uk-form-controls">
                        <textarea class="uk-textarea" name="description" placeholder="可选,文章描述">{$info.description}</textarea>
                    </div>
                </div>
                <div class="uk-form-group">
                    <label class=" uk-form-label">文章状态</label>
                    <div class="uk-form-controls uk-form-controls-text">
                        <?php $info['status'] = isset($info['status']) ? $info['status'] : 1;  ?>
                        <div class="uk-grid">
                            <label>
                                <!--if{$info['status']}-->
                                <input class="uk-radio" name="status" value="1" checked="checked" type="radio">
                                <!--{else}-->
                                <input class="uk-radio" name="status" value="1" type="radio">
                                <!--{/if}-->
                                发布
                            </label>
                            <label>
                                <!--if{!$info['status']}-->
                                <input class="uk-radio" name="status" checked="checked" value="0" type="radio">
                                <!--{else}-->
                                <input class="uk-radio" name="status" value="0" type="radio">
                                <!--{/if}-->
                                草稿
                            </label>
                        </div>
                    </div>
                </div>
                <div class="uk-form-group">
                    <div class="uk-form-controls">
                        <input type="hidden" name="article_id" value="{$info.article_id}">
                        <button class="uk-button uk-button-primary" type="submit" disabled>保存</button>
                    </div>
                </div>

            </fieldset>
        </div>
    </div>

</form>
